<?php
require_once('conexion_db.php');
require_once('auxiliares.php');
require_once('smarty/libs/Smarty.class.php');


$email =  isset($_POST['email']) ? mysql_real_escape_string($_POST['email']) : '';
$password =  isset($_POST['pass']) ? md5(mysql_real_escape_string($_POST['pass']) ) : '';


$q = "INSERT INTO users(
    email, 
    pass
    ) VALUES(
    '$email',
    '$password')";
    

mysql_query( $q ) or die( mysql_error() );

# Template smarty
$oTpl = createObjSmarty();
$oTpl->display('tpl/registro_grabar.html')
?>
